#ifndef VILLAGETILE_H
#define VILLAGETILE_H

#include <QGraphicsObject>
#include "shopdialog.h"
#include "gamedialog.h"

class VillageTile : public QGraphicsObject
{
    Q_OBJECT
public:
    explicit VillageTile(QGraphicsObject *parent, int x, int y);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    QRectF boundingRect() const;
    void access();
    virtual QString name() = 0;

    QPoint getVillagePos();
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);    
    int _x, _y;

    ShopDialog* shopDialog;
signals:
    void pressed(VillageTile*);
    void pressed(QPoint);
public slots:
    void startAshop(VillageTile*);
    void printPos(QPoint);
};


class TeashopTile : public VillageTile
{
    Q_OBJECT
public:
    TeashopTile(QGraphicsObject *parent = 0, int x = 0, int y = 0);
    QString name();
protected:
protected slots:
};


class SorcererTile : public VillageTile
{
    Q_OBJECT
public:
    SorcererTile(QGraphicsObject *parent = 0, int x = 0, int y = 0);
    QString name();
protected:
protected slots:
};

class AltarTile : public VillageTile
{
    Q_OBJECT
public:
    AltarTile(QGraphicsObject *parent = 0, int x = 0, int y = 0);
    QString name();
protected:
protected slots:
};

class PavilionTile : public VillageTile
{
    Q_OBJECT
public:
    PavilionTile(QGraphicsObject *parent = 0, int x = 0, int y = 0);
    QString name();
protected:
protected slots:
};
#endif // VILLAGETILE_H
